package com.jiexin.dto;

import com.google.common.collect.Lists;
import com.jiexin.model.SysAclModule;
import com.jiexin.model.SysDept;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.beans.BeanUtils;

import java.util.List;

/**
 * @Author: Jay_Liu
 * @Description:
 * @Date: Created in 20:00 2018/4/16 0016
 * @Modified By:
 */
@Getter
@Setter
@ToString
public class AclModuleLevelDto extends SysAclModule{

    //下属的权限模块
    private List<AclModuleLevelDto> aclModuleList = Lists.newArrayList();

    //当前权限模块下的权限点集合
    private List<AclDto> aclList = Lists.newArrayList();

    //复制对象，因为是继承，可以实现相同字段的拷贝
    public static AclModuleLevelDto adapt(SysAclModule aclModule) {
        AclModuleLevelDto dto = new AclModuleLevelDto();
        BeanUtils.copyProperties(aclModule, dto);
        return dto;
    }
}
